package com.wetao.module_pen.contract;

import com.tstudy.blepenlib.data.BleDevice;
import com.wetao.lib_common.base.BaseListResponse;
import com.wetao.lib_common.base.BasePresenter;
import com.wetao.lib_common.base.BaseResponse;
import com.wetao.lib_common.base.BaseViewImp;
import com.wetao.lib_common.bean.response.CheckStudentMacResp;
import com.wetao.lib_common.bean.response.StudentExamGridInfoResp;

import java.util.HashMap;

/**
 * author: zhouyh
 * created on: 2019-11-15 16:27
 * description:
 */
public interface PenConnectFragmentCon {

    interface View extends BaseViewImp {
        void checkStudentMacResult(BaseResponse<CheckStudentMacResp> response, BleDevice posBle);
        void checkStudentMacFailed();
        void studentConfirmConnectResult(BaseResponse<CheckStudentMacResp> response, BleDevice posBle);
        void studentConfirmConnectFailed();
        void studentExamGridInfoResult(BaseListResponse<StudentExamGridInfoResp> response);
        void studentExamGridInfoFailed();
        void studentExamCommitPenDataResult(BaseResponse response);
        void studentExamCommitPenDataFailed();

    }

    abstract class Presenter extends BasePresenter<View> {
        public abstract void checkStudentMac(HashMap<String, String> map, boolean isDialog, boolean isCancelable, BleDevice posBle);
        public abstract void studentConfirmConnect(HashMap<String, String> map, boolean isDialog, boolean isCancelable, BleDevice posBle);
        public abstract void studentExamGridInfo(String json, boolean isDialog, boolean isCancelable);
        public abstract void studentExamCommitPenData(String json, boolean isDialog, boolean isCancelable);


    }
}
